home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 4 / The Arsenal Files 4 (Arsenal Computer).ISO / ham / sattrk31.tgz / sattrack-3.1.tar / SatTrack / src / include / satglobals.h < prev    next >
Text File  |  1995-03-16  |  14KB  |  224 lines

  1. /******************************************************************************/
  2. /*                                                                            */
  3. /*  Title       : satglobals.h                                                */
  4. /*  Author      : Manfred Bester                                              */
  5. /*  Date        : 03Mar92                                                     */
  6. /*  Last change : 15Mar95                                                     */
  7. /*                                                                            */
  8. /*  Synopsis    : Definitions of global variables for 'sattrack'.             */
  9. /*                                                                            */
  10. /*                                                                            */
  11. /*  SatTrack is Copyright (c) 1992, 1993, 1994, 1995 by Manfred Bester.       */
  12. /*  All Rights Reserved.                                                      */
  13. /*                                                                            */
  14. /*  Permission to use, copy, and distribute SatTrack and its documentation    */
  15. /*  in its entirety for educational, research and non-profit purposes,        */
  16. /*  without fee, and without a written agreement is hereby granted, provided  */
  17. /*  that the above copyright notice and the following three paragraphs appear */
  18. /*  in all copies. SatTrack may be modified for personal purposes, but        */
  19. /*  modified versions may NOT be distributed without prior consent of the     */
  20. /*  author.                                                                   */
  21. /*                                                                            */
  22. /*  Permission to incorporate this software into commercial products may be   */
  23. /*  obtained from the author, Dr. Manfred Bester, 1636 M. L. King Jr. Way,    */
  24. /*  Berkeley, CA 94709, USA. Note that distributing SatTrack 'bundled' in     */
  25. /*  with ANY product is considered to be a 'commercial purpose'.              */
  26. /*                                                                            */
  27. /*  IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, */
  28. /*  SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF   */
  29. /*  THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE AUTHOR HAS BEEN ADVISED  */
  30. /*  OF THE POSSIBILITY OF SUCH DAMAGE.                                        */
  31. /*                                                                            */
  32. /*  THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT      */
  33. /*  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A   */
  34. /*  PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS"      */
  35. /*  BASIS, AND THE AUTHOR HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, */
  36. /*  UPDATES, ENHANCEMENTS, OR MODIFICATIONS.                                  */
  37. /*                                                                            */
  38. /******************************************************************************/
  39.  
  40. double precMatrix[3][3];               /* precession matrix                   */
  41. double precMatrixTr[3][3];             /* transposed precession matrix        */
  42. double siteRotMatGl[3][3];             /* site transformation matrix          */
  43.  
  44. double sunPosGl[3];                    /* in Right Ascension based system     */
  45. double moonPosGl[3];                   /* in Right Ascension based system     */
  46.  
  47. double satPosGl[3];                    /* in Right Ascension based system     */
  48. double satPosPrec[3];                  /* in Right Ascension based system     */
  49. double satVelGl[3];                    /* velocity [km/s]                     */
  50.  
  51. double satPosS[3];                     /* in Right Ascension based system     */
  52. double satVelS[3];                     /* velocity [km/s]                     */
  53.  
  54. double sitePosGl[3];                   /* in Right Ascension based system     */
  55. double siteVelGl[3];                   /* velocity [km/s]                     */
  56.  
  57. double localVecSatGl[3];               /* in local geodetic system            */
  58. double localVecSunGl[3];               /* in local geodetic system            */
  59. double localVecMoonGl[3];              /* in local geodetic system            */
  60.  
  61. double siteVecGl[3];                   /* fixed site vector on the Earth      */
  62.  
  63. double satAttGl[3];                    /* attitude vector in Bahn coordinates */
  64. double satSquintGl[3];                 /* squint vector in Bahn coordinates   */
  65.  
  66. double curTimeGl;                      /* global current time [d]             */
  67. double epochDay, elsetEpochDay;        /* time of epoch                       */
  68. double elsetEpoch;
  69.  
  70. double epochMeanAnomaly;               /* Mean Anomaly at epoch               */
  71. double epochRaan;                      /* RAAN at epoch                       */
  72. double epochMeanMotion;                /* [rev/day]                           */
  73. double curMeanMotion;                  /* [rev/day]                           */
  74. double decayRate;                      /* [rev/day^2]                         */
  75. double decayRateDot;                   /* [rev/day^3]                         */
  76. double bStarCoeff;                     /* BSTAR drag coefficient              */
  77. double epochArgPerigee;                /* argument of perigee at epoch        */
  78. double eccentricity;                   /* eccentricity of satellite orbit     */
  79. double inclination;                    /* inclination of satellite orbit      */
  80. double sunPhaseAngle;                  /* angle between ground station and    */
  81.                                        /* the Sun as seen from the satellite  */
  82.  
  83. double sunRA, sunDec, sunAzimuth, sunElevation, sunDist, sunLat, sunLong;
  84. double moonRA, moonDec, moonAzimuth, moonElevation, moonDist;
  85.  
  86. double refOrbit;                       /* orbit number at epoch               */
  87. double curOrbit, orbitFract;           /* double current orbit number         */
  88. double stsOrbit, stsOrbitFract;        /* current orbit number for STS        */
  89. double curMotion, curMotionX;          /* current number of rev/day           */
  90. double meanAnomaly, meanAnomalyX;      /* mean anomaly                        */
  91. double trueAnomaly, trueAnomalyX;      /* mean anomaly corrected for ellipse  */
  92. double semiMajorAxis;                  /* semimajor axis of satellite orbit   */
  93. double perigee;                        /* perigee of satellite orbit          */
  94. double perigeeHeight;                  /* perigee height of satellite orbit   */
  95. double apogeeHeight;                   /* apogee height of the orbit          */
  96. double satRadius;                      /* distance measured from geocenter    */
  97. double curRaan, curRaanX;              /* RAAN                                */
  98. double raanPrec;                       /* precession of RAAN                  */
  99. double curArgPerigee, curArgPerigeeX;  /* argument of perigee                 */
  100. double curArgNodeX;                    /* argument of the ascending node      */
  101. double curInclination;                 /* inclination                         */
  102. double curInclinationX;                /* inclination from SGP4/SDP4 model    */
  103. double perigeePrec;                    /* precession of argument of perigee   */
  104. double satLat, satLong, satHeight;     /* sub-satellite point                 */
  105. double satAzimuth, satElevation;       /* [rad]                               */
  106. double trackAzimuth, trackElevation;   /* [rad]                               */
  107. double lastTrackAzi, lastTrackEle;     /* [rad]                               */
  108. double trackAziRate, trackEleRate;     /* [rad/s]                             */
  109. double satRange;                       /* [km] or [nm]                        */
  110. double downlinkLoss, uplinkLoss;       /* downlink/uplink path loss [dB]      */
  111. double squintAngle;                    /* squint angle [deg]                  */
  112. double rangeRate;                      /* velocity w.r.t. ground station      */
  113. double satVelocity;                    /* orbital velocity [km/s]             */
  114. double downlinkFreq, uplinkFreq;       /* downlink/uplink frequency [Hz]      */
  115. double downlinkDopp, uplinkDopp;       /* downlink/uplink Doppler shift [Hz]  */
  116. double freqOffset, freqStep;           /* frequency tuning corrections [Hz]   */
  117. double xponderBandwidth, xponderSign;
  118.  
  119. double perigeePhase;
  120. double attLong, attLat;                /* spacecraft attitude [deg]           */
  121. double satPhase, maxPhase;             /* phase units in 1 orbit              */
  122.  
  123. double siteLat, siteLong, siteAlt;     /* site parameters                     */
  124. double effEarthRadius;
  125. double prevDispEle, prevSatLat;
  126. double defMinElevation, minElevation;  /* minimum elevation for pass calc.    */
  127.  
  128. double defDuration, duration;          /* duration of orbit prediction [d]    */
  129. double defStepTime, stepTime;          /* step time for orbit prediction [s]  */
  130. double startTime, stopTime, realTime;  /* time parameters [d]                 */
  131. double utcTime;                        /* UTC [d]                             */
  132. double julianDate;                     /* Julian date [d]                     */
  133. double lastJulianDateSun;              /* Julian date [d]                     */
  134. double lastJulianDatePrec;             /* Julian date [d]                     */
  135. double lastJulianDateNute;             /* Julian date [d]                     */
  136. double launchTime, launchEpoch;        /* launch time parameters [d]          */
  137. double timeZone;                       /* time zone [h] (west = '+')          */
  138. double gmsTime;                        /* Greenwich mean sidereal time        */
  139. double gasTime;                        /* Greenwich apparent sidereal time    */
  140. double lasTime;                        /* local apparent sidereal time        */
  141. double lastSunGraphTime;               /* last time terminator updated [d]    */
  142. double lastSatGraphHeight;             /* last height for visib circle [km]   */
  143. double totPsi, totEps;                 /* nutation in longitude and obliquity */
  144. double equEquinox;                     /* equation of the equinoxes           */
  145. double cityLat, cityLong;              /* nearest city coordinates [deg]      */
  146. double gndTrkDist;                     /* distance betw. SSP and nearest city */
  147. double atmPressure;                    /* atmospheric pressure [mmHg]         */
  148. double ambTemperature;                 /* ambient temperature [C]             */
  149. double relHumidity;                    /* relative humidity [%]               */
  150. double dummyd;                         /* dummy double precision variable     */
  151.  
  152. double cosInclination, sinInclination;
  153. double cosTrueAnomaly, sinTrueAnomaly;
  154.  
  155. long   satNum;                         /* number of satellite                 */
  156. long   dayNumber;                      /* day number since 1900               */
  157. long   lastDayNum;
  158. long   launchDate;                     /* launch date                         */
  159. long   epochOrbitNum;                  /* integer orbit number of epoch       */
  160. long   orbitNum, stsOrbitNum;          /* integer part of orbit number        */
  161. long   curYearSec;                     /* seconds in the year for tracking    */
  162. long   lastTrackYearSec;
  163.  
  164. int    satOrder[MAXSATS];
  165.  
  166. int    ephemerisType, launchYear, launchMonth, launchDay, launchHour;
  167. int    launchMin, launchSec, launchFlag, attitudeFlag, elementSet;
  168. int    numFreqs, freqPtr, numModes, propModelType, maidenHeadFlag; 
  169. int    batchModeFlag, debugFlag, defaultsFileFlag, defaultsFileNum;
  170. int    graphicsFlag, graphicsOpenFlag, modelFlag, quickStartFlag, verboseFlag;
  171. int    timeZoneFlag, timeZones;
  172. int    eclipseCode, eclipseRise, eclipseMax, eclipseSet;
  173. int    satTypeFlag, initNorad, geoSyncFlag, elevationFlag, newRiseFlag;
  174. int    passDispFlag, countdownFlag, checkCountdown, shortPredFlag;
  175. int    satCrashFlag, preLaunchFlag, preOrbitFlag;
  176. int    trackingFlag, trackCtrlFlag, trackDispFlag, trackingEnableFlag;
  177. int    liveDispFlag, didMultDispFlag;
  178. int    objectNumFlag, noPassFlag, xTermFlag, trueXtermFlag;
  179. int    gndTrkFlag, newGndTrkFlag;
  180. int    justAcquFlag, justLostFlag, pointerFlag, pageFlag;
  181. int    trackObject, newTrackObjectFlag, firstLine, firstPage, headerCol;
  182. int    numCities, oldCityNum, newCityNum, numSats, numSatsAuto, numTle;
  183. int    numLines, numLinesX, numSatLines, satLinePtr, numGroundStations;
  184. int    transitFlag, sunTransitFlag, sunProximity, sunTransit;
  185. int    mainChoice, nX, nY, lastX, lastY, firstGraphics, dummyi;
  186.  
  187. char   modesDat[80], sitesDat[80], defaultsDat[80], defSatGroup[10];
  188. char   defTimeZoneStr[10], timeZoneStr[10], elementFile[80];
  189. char   satName[80], satTrackName[80], satAlias[80], fullSatAlias[80];
  190. char   satFileName[80], siteName[80], siteNameID[80], fullSiteName[80];
  191. char   satGroup[10], maidenHead[10];
  192. char   defDispType[10], defSat[40], defSet[40], defSetTLE[40], defSetSTS[40];
  193. char   defSetType[40], defSite[40], elementType[40], callSign[25];
  194. char   downlinkMode[8], uplinkMode[8], modeString[10], timeString[80];
  195. char   epochString[40];
  196. char   launchString[40], updateString[40], header[80], propModel[20];
  197. char   gndTrkDir[10], gndTrkCity[80], dispStr[80], termTypeX[20];
  198. char   antennaIO[80], radioIOA[80], radioIOB[80];
  199. char   batchTimeZone[10];
  200. char   batchSiteName[80], batchSatName[80], batchTleFile[80];
  201. char   batchTleType[80], batchPredType[80], batchStartDate[80];
  202. char   batchStartTime[80], batchStepTime[80], batchDuration[80];
  203. char   batchMinElev[80], batchHardcopy[80], helpStr[80], licenseFile[80];
  204. char   graphicsTitle[80], xTimeStr[80], xMetStr[25], xGndTrkStr[80];
  205. char   sattrackTitle[80];
  206. char   *strpHome, *strpTerm, *strpDisp, *strpRgst;
  207.  
  208. FILE   *fpr, *outFile, *antennaFile, *radioFileA, *radioFileB;
  209.  
  210. cityType    city[MAXCITIES];
  211. tleType     tle[MAXSATS];
  212. satelType   satel[MAXSATS];
  213. freqType    freqs[MAXFREQS];
  214. modeType    modes[MAXMODES];
  215. satType     sat[MAXSATS];
  216. trackType   groundTrack[NSEGSGT];
  217. stationType groundStation[MAXSTATIONS];
  218.  
  219. /******************************************************************************/
  220. /*                                                                            */
  221. /* End of include file satglobals.h                                           */
  222. /*                                                                            */
  223. /******************************************************************************/
  224.